/**
 * render column overwrite querylist4ext.js
 * 
 * @param {}
 *            value
 * @param {}
 *            cellmeta
 * @param {}
 *            record
 * @param {}
 *            rowIndex
 * @param {}
 *            columnIndex
 * @param {}
 *            store
 * @return {}
 */
function renderHeader(value, cellmeta, record, rowIndex, columnIndex, store) {
	var fieldName = Ext.getCmp(querykey).getColumnModel()
			.getDataIndex(columnIndex);
	if (fieldName == 'OPEN') {
		var resultString = String
				.format(
						'<b><a href="'
								+ context
								+ '/app/lfbl.do?method=edithdl&id={0}&querykey=' + querykey + '">办理</a></b>',
						record.data.ID, value);

		return resultString;
	}else if (fieldName == 'XFTIME') {
		return formatDate(value);
	}else if(fieldName == 'XJTIME'){
		//var now = new Date().pattern("yyyyMMdd"); 
		var now = new Date().pattern("MM-dd-yyyy"); 
		f = value.substring(0, 4);
		m = value.substring(5, 7);
		e = value.substring(8, 10);
		var xjtime = m+"-"+e+"-"+f ;
		
		if (Date.parse(xjtime) - Date.parse(now)<= 0) {
		
		return "<div align='center'><img src='"
				+ context
				+ "/app/lf/images/lamp3.gif'  style='margin-bottom:-4px'/></div>" ;
		}else if (Date.parse(xjtime) - Date.parse(now)  >= 15) {
		return "<div align='center'><img src='"
				+ context
				+ "/app/lf/images/lamp4.gif'  style='margin-bottom:-4px'/></div>" ;
		}else if (0 < Date.parse(xjtime) - Date.parse(now) < 15) {
		return "<div align='center'><img src='"
				+ context
				+ "/app/lf/images/lamp2.gif'  style='margin-bottom:-4px'/></div>" ;
		}
		return now;
	}
	return value;
}